package com.youtills.core.auth.db.dao;

import com.youtills.core.db.DataSourceType;
import com.youtills.core.mybatis.MybatisSqlSessionFactoryBuilder;
import org.apache.ibatis.session.SqlSessionFactory;

/**
 * Created by IntelliJ IDEA.
 * User: ravi
 * Date: 8/14/12
 * Time: 10:43 AM
 * To change this template use File | Settings | File Templates.
 */
class BaseAuthDao {

    private final SqlSessionFactory sqlSessionFactory;

    BaseAuthDao() {

        String resource = "com/youtills/core/auth/db/dao/mybatis-config.xml";
        sqlSessionFactory = MybatisSqlSessionFactoryBuilder.buildSessionFactory(resource, DataSourceType.QGLDB);
    }

    protected SqlSessionFactory getSqlSessionFactory(){
        return sqlSessionFactory;
    }
}
